/**
 * Ingenius-Group S.A.S
 *
 * Project: SAU
 * File: Info.java
 * Date: 14/03/2011
 */

package com.ingenius.sau.client.view.widgets;

import com.extjs.gxt.ui.client.util.Point;
import com.extjs.gxt.ui.client.widget.Info;
import com.extjs.gxt.ui.client.widget.InfoConfig;

/**
 * Class <strong>Info</strong>
 * 
 * @author Jesus David
 * @version 0.1
 */
public class PopupInfo extends Info {

	/**
	 * 
	 * @param message
	 */
	public static void show(String message) {
		show(message, 2500);
	}

	/**
	 * 
	 * 
	 * @param message
	 * @param miliseconds
	 */
	public static void show(String message, int miliseconds) {
		PopupInfo info = new PopupInfo();

		InfoConfig config = new InfoConfig(null, message);
		config.display = miliseconds;

		info.setBodyStyle("background-color: #D0E0ED; color: #555; text-align: center; border: 1px solid #99BBE8; padding: 20px 10px; font-size: 13px; font-weight: bold;");
		info.setFrame(false);
		info.setAnimCollapse(true);
		info.show(config);
		Point p = info.position();
		info.setPosition(p.x - 15, p.y - 10);
	}

}
